﻿/********************************************************************************/
// <copyright file="EntityBase.cs" company="Asia E-Business Solutions">
//     Copyright © 2012. All right reserved
// </copyright>
//
// <history>
//  <change who="Hieu Nguyen" date="11/12/2012 11:54:51 AM">Created</change>
// <history>
/********************************************************************************/
namespace JLL.China.Infrastructure.DomainBase
{
    using System;

    public abstract class EntityBase<T> : IEntity<T> where T : new()
    {
        public T ID
        {
            get;
            set;
        }

        /// <summary>
        /// Default Constructor.
        /// </summary>
        protected EntityBase()
            : this(default(T))
        {
        }

        /// <summary>
        /// Overloaded constructor.
        /// </summary>
        /// <param name="key">An <see cref="System.Object"/> that 
        /// represents the primary identifier value for the 
        /// class.</param>
        protected EntityBase(T key)
        {
            this.ID = key;
        }
    }
}
